window.onload = function () {
   let editor =  document.getElementById('editor');
   editor.setAttribute("contenteditable", "true");
}

function queryWriteData(){
    let editor =  document.getElementById('editor');
    editor.blur();
    let content = editor.innerHTML;
    let info = {
        command:'write',
        msg:content,
    }
    latte.event(JSON.stringify(info));
    return "返回数据成功";
}

function queryBackData(){
    let editor =  document.getElementById('editor');
    editor.blur();
    let content = editor.innerHTML;
    let info = {
        command:'back',
        msg:content
    }
    latte.event(JSON.stringify(info));
    return "返回数据成功";
}